package com.vancouver.knows.business.service.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.pangu.util.StringUtil;
import com.vancouver.knows.business.bean.DiscountInfo;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 地图查询城惠信息
 * <p/>
 * Created by cxlin
 */
public class FetchHomeMapHandler extends ACheckableJsonParser {

	private List<DiscountInfo> data;

	@Override
	protected void parserContent(JSONObject content) throws Exception {
		String posts = content.getString("posts");
		if (StringUtil.isEmptyString(posts)) {
			data = new ArrayList<DiscountInfo>();
		} else {
			data = JSON.parseArray(posts, DiscountInfo.class);
		}
	}

	public List<DiscountInfo> getData() {
		return data;
	}
}
